<%--
    Document   : add_warehouse
    Created on : Nov 6, 2009, 4:23:47 AM
    Author     : moustafa
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Edit Warehouse</title>
    </head>
    <body onload="setTimeout('document.getElementById(\'message\').innerHTML=\'<br/>\'', 2500)">
        <%
            request.getSession().setAttribute("product_id", request.getParameter("product_id"));
            String message = (String)request.getSession(false).getAttribute("added_message");
            request.getSession(false).setAttribute("added_message", null);
        %>
        <p align="center" style="color:green" id="message"><%=message != null ? message : "<br/>"%></p>

        <form action="../admin/editproduct">
        <table border="1" cellspacing="1" cellpadding="1">
            <tbody>
                <tr>
                    <td>Product Name: </td>
                    <td><input type="text" name="product_name" value="<%=request.getParameter("product_name")%>" /></td>
                </tr>
                <tr>
                    <td>Product Description: </td>
                    <td><input type="text" name="product_description" value="<%=request.getParameter("product_description")%>" /></td>
                </tr>
                <tr>
                    <td>Product Image: </td>
                    <td><input type="file" name="product_image_url" value="<%=request.getParameter("product_image")%>" /></td>
                </tr>
                <tr>
                    <td>Product Status: </td>
                    <td>
                        <select name="product_status">
                            <%String productStatus = request.getParameter("product_status");%>
                            <option <%if(productStatus.equals("orderable"))%><%="selected='true'"%> >orderable</option>
                            <option <%if(productStatus.equals("planned"))%><%="selected='true'"%> >planned</option>
                            <option <%if(productStatus.equals("under development"))%><%="selected='true'"%> >under development</option>
                            <option <%if(productStatus.equals("obsolete"))%><%="selected='true'"%> >obsolete</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>List Price: </td>
                    <td><input type="text" name="product_list_price" value="<%=request.getParameter("product_list_price")%>" /></td>
                </tr>
                <tr>
                    <td>Min Price: </td>
                    <td><input type="text" name="product_min_price" value="<%=request.getParameter("product_min_price")%>" /></td>
                </tr>
                <tr>
                    <td>Catalog URL: </td>
                    <td><input type="text" name="product_catalog_url" value="<%=request.getParameter("product_catalog_url")%>" /></td>
                </tr>
            </tbody>
        </table>
            <input type="submit" value="Edit Product" />
        </form>
        <form action="../admin/products">
            <input type="submit" value="Go Back"/>
        </form>
    </body>
</html>
